Optimal. Leaf size=73 \[ -\frac {a^2}{2 d (a-a \cos (c+d x))}+\frac {3 a \log (1-\cos (c+d x))}{4 d}-\frac {a \log (\cos (c+d x))}{d}+\frac {a \log (1+\cos (c+d x))}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 73, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {3957, 2915, 12,
84} \begin {gather*} -\frac {a^2}{2 d (a-a \cos (c+d x))}+\frac {3 a \log (1-\cos (c+d x))}{4 d}-\frac {a \log (\cos (c+d x))}{d}+\frac {a \log (\cos (c+d x)+1)}{4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 84
Rule 2915
Rule 3957
Rubi steps
\begin {align*} \int \csc ^3(c+d x) (a+a \sec (c+d x)) \, dx &=-\int (-a-a \cos (c+d x)) \csc ^3(c+d x) \sec (c+d x) \, dx\\ &=\frac {a^3 \text {Subst}\left (\int \frac {a}{(-a-x)^2 x (-a+x)} \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=\frac {a^4 \text {Subst}\left (\int \frac {1}{(-a-x)^2 x (-a+x)} \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=\frac {a^4 \text {Subst}\left (\int \left (-\frac {1}{4 a^3 (a-x)}-\frac {1}{a^3 x}+\frac {1}{2 a^2 (a+x)^2}+\frac {3}{4 a^3 (a+x)}\right ) \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=-\frac {a^2}{2 d (a-a \cos (c+d x))}+\frac {3 a \log (1-\cos (c+d x))}{4 d}-\frac {a \log (\cos (c+d x))}{d}+\frac {a \log (1+\cos (c+d x))}{4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.55, size = 114, normalized size = 1.56 \begin {gather*} -\frac {a \csc ^2\left (\frac {1}{2} (c+d x)\right )}{8 d}-\frac {a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{2 d}+\frac {a \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{2 d}-\frac {a \left (\csc ^2(c+d x)+2 \log (\cos (c+d x))-2 \log (\sin (c+d x))\right )}{2 d}+\frac {a \sec ^2\left (\frac {1}{2} (c+d x)\right )}{8 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.10, size = 41, normalized size = 0.56
method | result | size |
derivativedivides | \(\frac {a \left (-\frac {1}{2 \left (-1+\sec \left (d x +c \right )\right )}+\frac {3 \ln \left (-1+\sec \left (d x +c \right )\right )}{4}+\frac {\ln \left (1+\sec \left (d x +c \right )\right )}{4}\right )}{d}\) | \(41\) |
default | \(\frac {a \left (-\frac {1}{2 \left (-1+\sec \left (d x +c \right )\right )}+\frac {3 \ln \left (-1+\sec \left (d x +c \right )\right )}{4}+\frac {\ln \left (1+\sec \left (d x +c \right )\right )}{4}\right )}{d}\) | \(41\) |
norman | \(-\frac {a}{4 d \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+\frac {3 a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}-\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}-\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}\) | \(71\) |
risch | \(\frac {a \,{\mathrm e}^{i \left (d x +c \right )}}{d \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )^{2}}+\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{2 d}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{2 d}-\frac {a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) | \(83\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 52, normalized size = 0.71 \begin {gather*} \frac {a \log \left (\cos \left (d x + c\right ) + 1\right ) + 3 \, a \log \left (\cos \left (d x + c\right ) - 1\right ) - 4 \, a \log \left (\cos \left (d x + c\right )\right ) + \frac {2 \, a}{\cos \left (d x + c\right ) - 1}}{4 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.89, size = 93, normalized size = 1.27 \begin {gather*} -\frac {4 \, {\left (a \cos \left (d x + c\right ) - a\right )} \log \left (-\cos \left (d x + c\right )\right ) - {\left (a \cos \left (d x + c\right ) - a\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 3 \, {\left (a \cos \left (d x + c\right ) - a\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 2 \, a}{4 \, {\left (d \cos \left (d x + c\right ) - d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} a \left (\int \csc ^{3}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int \csc ^{3}{\left (c + d x \right )}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.45, size = 102, normalized size = 1.40 \begin {gather*} \frac {3 \, a \log \left (\frac {{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right ) - 4 \, a \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} - 1 \right |}\right ) + \frac {{\left (a - \frac {3 \, a {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}}{\cos \left (d x + c\right ) - 1}}{4 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.96, size = 53, normalized size = 0.73 \begin {gather*} \frac {\frac {a}{2\,\left (\cos \left (c+d\,x\right )-1\right )}-a\,\ln \left (\cos \left (c+d\,x\right )\right )+\frac {3\,a\,\ln \left (\cos \left (c+d\,x\right )-1\right )}{4}+\frac {a\,\ln \left (\cos \left (c+d\,x\right )+1\right )}{4}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________